A circuit and method for decompressing image data that has been previously compressed for transmission or storage, and for the high speed loading of a band buffer in a bit map printing system.
In the usual high resolution scan system which transforms an original image, a photograph or the like, into a digital bit stream, usually through the use of a raster input scanner and thresholding circuit, there is a need to compress the resulting data. The reason may be to store the data in a minimum amount of memory, or to transmit the data in a minimum amount of time or to use a minimum bandwidth. One method of data compression is to encode the data into a run length code, a Huffman code, or any other well known compression code. In addition, a predictor may be used before the encoder. A predictor results in fewer one bits, longer runs of zeros, and a more efficient encoding. Later, when the compressed data is read out from memory, or when it is received as a transmission, it must be decoded and depredicted to reconsitute the original video.
In the transmission of an image, in a facsimile system or the like the compressing algorithm will occasionally result in an actual expansion of the data. This will usually occur in an image that has a great amount of detail, resulting in short run lengths. For example, in the disclosed embodiment, an eight bit code word may be required to encode four bits of data. An improvement in an encoding-decoding system is to inspect a compressed line, and to transmit raw video if the compression algorithm resulted in an expansion of the data. The associated decompressor must be able, on the receipt of the appropriate flag bits to couple the raw video to its output without going through the decoding and deprediction process.
A third function of a decompressor is to be able to fill a band buffer which, in this system, is defined as a memory for storing the video required for sixty-four scan lines, at high speed to enable a bit map capability. A system having a bit map capability may be defined as having in memory a matrix of video bits equal to the number of pixels capable of being printed. Then, the completed bit map may be simply shifted out to the raster output scanner as a series of black or white signals in synchronization with the raster. The memory requirement is reduced by producing the bit map one band at a time. In the described embodiment, two band buffers, each with a capacity of sixty-four scan lines, are used. One is loaded from the decompressor while the other drives the printer.
In this disclosed system, the entire display, comprising image and text, resides in memory in condensed form. The image data is compressed and the text is character coded. Additionally, each element (image or character) contains size and location pointers in memory.
Using this system, a band is filled prior to being output to the printer by first writing the image information into it, segment by segment. The video is retrieved from memory, decompressed, located in the band, and loaded. For characters, a character generator is used which contains a font set for each size and style of font required. The character code is used to index the appropriate font set and to access the particular font raster, in compressed form, and this raster is then decompressed to produce the font video.
Some characters and most images will overlap several bands. In this case, intermediate information is stored away in memory for use during the next band loading cycle.
If a hard copy printing engine is to be driven, as is assumed for the remainder of this discussion, the bandwidth requirement is severe since an office-quality copy at modern copier/duplicator speeds can be produced only at a high bit rate.
Because of the factors stated above, a data decompressor in a system for printing mixed image and text must be capable of depredicting and decoding compressed video, and of loading a band buffer at high speeds.